﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;

namespace ERPStore.Demo
{
	public class OptimizationService : ERPStore.Web.Services.IOptimizationService
	{
		public OptimizationService()
		{
		}

		public void GenerateMetasInformations(System.Web.HttpContextBase context, object model)
		{
			// Do nothing
		}

		public void RegisterBundles(System.Web.HttpContextBase context)
		{
			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
				"~/Scripts/jquery-{version}.js"));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
				"~/Scripts/jquery-ui-{version}.js"));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
				"~/Scripts/jquery.unobtrusive*",
				"~/Scripts/jquery.validate*"));

			// Use the development version of Modernizr to develop with and learn from. Then, when you're
			// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
						"~/Scripts/modernizr-*"));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/knockout").Include(
						"~/Scripts/knockout-*"));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/erpstore")
				.IncludeDirectory("~/scripts/app", "*.js"));

			BundleTable.Bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

			BundleTable.Bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
						"~/Content/themes/base/jquery.ui.core.css",
						"~/Content/themes/base/jquery.ui.resizable.css",
						"~/Content/themes/base/jquery.ui.selectable.css",
						"~/Content/themes/base/jquery.ui.accordion.css",
						"~/Content/themes/base/jquery.ui.autocomplete.css",
						"~/Content/themes/base/jquery.ui.button.css",
						"~/Content/themes/base/jquery.ui.dialog.css",
						"~/Content/themes/base/jquery.ui.slider.css",
						"~/Content/themes/base/jquery.ui.tabs.css",
						"~/Content/themes/base/jquery.ui.datepicker.css",
						"~/Content/themes/base/jquery.ui.progressbar.css",
						"~/Content/themes/base/jquery.ui.theme.css"));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/angularjs").Include(
				"~/scripts/angular.js"
				, "~/scripts/angular-loader.js"
				, "~/scripts/angular-bootstrap.js"
				, "~/scripts/angular-scenario.js"
				, "~/scripts/angular-sanitize.js"
				, "~/scripts/angular-resource.js"
				, "~/scripts/angular-cookies.js"
				, "~/scripts/angular-bootstrap-prettify.js"
			));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/angular-ui-bootstrap").Include(
				"~/scripts/ui-bootstrap-{version}.js"
			));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/angular-ui").Include(
				"~/scripts/angular-ui.js",
				"~/scripts/keypress.js"
			));

			BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrapjs").Include(
				"~/scripts/bootstrap.js"
			));

			BundleTable.Bundles.Add(new StyleBundle("~/bundles/bootstrap").Include(
				"~/content/bootstrap.css"
				, "~/content/bootstrap-responsive.css"
			));

		}

	}
}